<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;

use App\Http\Model\Comment;

class CommentController extends Controller
{
    //评论列表
    public function commentList(){
    	$comment = new Comment;
    	$commentInfo = $comment->orderBy('status','desc')->get();
    	return view("admin.comment.commentList", ["commentInfo"=> $commentInfo]);
    }
    //评论回复
    public function replyComment(Request $request){
    	$comment = new Comment;
    	$commentInfo = $comment->find($request->input('id'));
    	$commentInfo->re_comment = $request->input('message');
        $commentInfo->status = 1;
    	$commentInfo->save();
    	echo 1;die;
    }
}